package bookExercise;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class A14skip {
    public static void main(String[] args) {
        List<A14Emplyee> list =A14Emplyee.getEmpList();
        Stream<A14Emplyee> stream =list.stream();
        stream =stream.filter(n ->"男".equals(n.getSex()));
        stream =stream.skip(2);
        List<A14Emplyee> collect = stream.collect(Collectors.toList());
        for (A14Emplyee a14Emplyee : collect) {
            System.out.println(a14Emplyee);
        }

    }
}
